﻿using Microsoft.AspNetCore.SignalR;
using Quantum.Core;

namespace Quantum.SignalR
{
    public abstract class AbstractBroadcaster : Hub, IPublishBehavior
    {
        private void DispatchMessage(string message)
        {
            Clients.All.InvokeAsync("Publish", message);
        }
       
        public virtual void Publish(string message)
        {
            DispatchMessage(message);
        }
    }
}
